<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        var xhr = new XMLHttpRequest();
        xhr.open("GET" , "./wo12.php?city=广州");
        xhr.send();
        xhr.onreadystatechange = function(){
              if( xhr.readyState === 4 && /^2\d{2}/.test(xhr.status)){
                    console.log(JSON.parse(xhr.responseText));
              }
        }

  </script>
</body>
</html>